package org.act.xservices.rt.xcontainer.transport.worker;

import org.act.xservices.rt.xcontainer.framework.IConnector;
import org.act.xservices.rt.xcontainer.framework.dispatcher.ADispatchWorkerFactory;
import org.act.xservices.rt.xcontainer.framework.dispatcher.ISafeDispatchWorker;
import org.act.xservices.rt.xcontainer.inf.context.IATFTransportContext;


/**
 * 
 * @LastModifyTime 2008-10-10
 * @CreationTime
 * @author Lizq [lizq@act.buaa.edu.cn]
 * @since JDK1.5
 */
public class TransportOutWorkerFactory extends
		ADispatchWorkerFactory<IATFTransportContext> {

	/**
	 * @param connectorEnvironment
	 */
	public TransportOutWorkerFactory(
			IConnector connector) {
		super(connector);
	}

	@SuppressWarnings("unchecked")
	public final ISafeDispatchWorker createSafeDispatchWorker(
			IATFTransportContext transContext) {
		
		TransportOutWorker transOutExecutor = new TransportOutWorker(getConnector());
		transOutExecutor.setTransportContext(transContext);
		return transOutExecutor;
	}

}
